unit Td_Balance_List;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, BaseDataListForm, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, cxStyles, dxSkinsCore, dxSkinsDefaultPainters,
  dxSkinscxPCPainter, cxDataStorage,
  cxEdit, DB, cxDBData, Menus, DBActns, StdActns, ActnList, ImgList,
  cxClasses, cxGridCustomView, cxGridCustomTableView,
  cxGridTableView, cxGridDBTableView, cxGrid, ExtCtrls, StdCtrls,
  MisString,cxContainer, cxLabel, cxCheckBox,
  Uni, cxTextEdit, cxMaskEdit, cxDropDownEdit,
  cxGridCustomPopupMenu, dxSkinsForm, cxNavigator,
  System.Actions, cxCustomData, cxFilter, cxData, cxGridPopupMenu, MemDS,
  DBAccess, System.ImageList, cxGridLevel, cxButtons;

type
  TfrmTd_Balance_List = class(TfrmBaseDataListForm)
    Qry_Account: TUniQuery;
    code: TcxGridDBColumn;
    name: TcxGridDBColumn;
    _AccCountName: TcxGridDBColumn;
    MainDataSetUbalanceid: TIntegerField;
    MainDataSetUcode: TWideStringField;
    MainDataSetUname: TWideStringField;
    MainDataSetUaccid: TIntegerField;
    MainDataSetUpause: TBooleanField;
    MainDataSetUisbill: TBooleanField;
    MainDataSetU_AccCountName: TStringField;
    MainDataSetUpos: TBooleanField;
    MainDataSetUposflag: TIntegerField;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  protected
    function AppendRecord(): Boolean; override;
    function EditRecord(): Boolean;   override;
  public
    { Public declarations }
  end;

var
  frmTd_Balance_List: TfrmTd_Balance_List;

implementation

uses Td_Balance_Edit;

{$R *.dfm}

function TfrmTd_Balance_List.AppendRecord: Boolean;
begin
  ShowEditForm(frmTd_Balance_Edit,TfrmTd_Balance_Edit,et_New);
  Result := True;
end;

function TfrmTd_Balance_List.EditRecord: Boolean;
begin
  ShowEditForm(frmTd_Balance_Edit,TfrmTd_Balance_Edit,et_Modify);
  Result := True;
end;

procedure TfrmTd_Balance_List.FormCreate(Sender: TObject);
begin
  FKeyField  := 'balanceid';
  FCodeField := 'code';
  FTableName := 'Td_Balance';
  inherited;

end;

end.
